/* eslint-disable semi */
/* eslint-disable semi */
/* eslint-disable quotes */
<template>
  <div class="show-line">
    <div class="Area-1" :class="[this.$route.params.status==1? 'addstatus ':'' ]">
      <div class="Area-1-img" v-for="(item, index) in middleimages" :key="index">
        <van-image width="1.76rem" height="1.76rem" :src="item.imgSrc" />
      </div>
      <!-- <van-tabbar-item class="hello-5-bottom" replace to="/MyInfo" icon="MyInfo"> -->
      <!-- </van-tabbar-item> -->
      <!-- <router-link to="/GoTraining"> -->
      <router-link to="/Login">
        <button class="Area-1-button">去登录</button>
      </router-link>

    </div>

    <div class="Area-1" :class="[this.$route.params.status==1? ' ':'addstatus' ]">
      <div class="Area-1-img addbottom" v-for="(item, index) in registerimages" :key="index">
        <van-image width="1.76rem" height="1.76rem" :src="item.imgSrc" />
      </div>
      <!-- <van-tabbar-item class="hello-5-bottom" replace to="/MyInfo" icon="MyInfo"> -->
      <!-- </van-tabbar-item> -->
      <!-- <router-link to="/GoTraining"> -->
      <p class="vip-name">ashuai5115</p>

      <p class="vip-one-card">
        <span class="showspan">游客</span>
        <span class="showspan">ID:82598521</span>
        <span class="showspan">金猪币:￥0.00</span>
      </p>

    </div>

    <div class="Area-2">
      <div v-for="(item2, index) in twoimages" :key="index">
        <div class="Area-2-div" @click="Turnto(item2.id,item2.name)">
          <van-image class="Area-2-div-img" width="1.22667rem" height="1.22667rem" :src="item2.imgSrc" />
          <p class="Area-2-div-p">{{item2.name}}</p>
        </div>
      </div>

    </div>

    <div class="Area-3">
      <div class="Area-3-div" @click="gotolink(0)">
        <div class="Area-3-div-left">

          <van-icon class="Ares-3-icon" name="setting" />
          <span class="Ares-3-span">账号管理</span>
        </div>
        <div class="Area-3-div-right">
          <van-icon class="Area-3-div-right-icon" name="arrow" />
        </div>
      </div>
      <div class="Area-3-div" @click="gotolink(1)">
        <div class="Area-3-div-left">
          <van-icon class="Ares-3-icon" name="service" />
          <span class="Ares-3-span">专属客服</span>
        </div>
        <div class="Area-3-div-right">
          <van-icon class="Area-3-div-right-icon" name="arrow" />
        </div>
      </div>
      <div class="Area-3-div" @click="gotolink(2)">
        <div class="Area-3-div-left">
          <van-icon class="Ares-3-icon" name="question" />
          <span class="Ares-3-span">常见问题</span>
        </div>
        <div class="Area-3-div-right">
          <van-icon class="Area-3-div-right-icon" name="arrow" />
        </div>
      </div>
      <div class="Area-3-div" @click="gotolink(3)">
        <div class="Area-3-div-left">
          <van-icon class="Ares-3-icon" name="info" />
          <span class="Ares-3-span">关于我们</span>
        </div>
        <div class="Area-3-div-right">
          <van-icon class="Area-3-div-right-icon" name="arrow" />
        </div>
      </div>

      <div class="Area-3-div" @click="gotolink(4)">
        <div class="Area-3-div-left">
          <van-icon class="Ares-3-icon" name="comment-circle" />
          <span class="Ares-3-span">联系我们</span>
        </div>
        <div class="Area-3-div-right">
          <van-icon class="Area-3-div-right-icon" name="arrow" />
        </div>
      </div>
    </div>
    <Tab-Bar :logeid="num"></Tab-Bar>
  </div>
</template>

<script>
import TabBar from "./TabBar.vue";
import { Dialog } from "vant";
export default {
  components: {
    TabBar
  },
  data() {
    return {
      num: 4,
      active: 1,
      middleimages: [{ id: 0, imgSrc: require("../assets/images/a19.png") }],
      registerimages: [{ id: 0, imgSrc: require("../assets/images/lin.jpg") }],
      twoimages: [
        {
          id: 0,
          name: "我的订单",
          imgSrc: require("../assets/images/a22.png")
        },
        {
          id: 1,
          name: "商城订单",
          imgSrc: require("../assets/images/a221.png")
        },
        {
          id: 2,
          name: "我的资产",
          imgSrc: require("../assets/images/a21.png")
        },
        {
          id: 3,
          name: "推广二维码",
          imgSrc: require("../assets/images/a20.png")
        }
      ],
      threeimages: [
        {
          id: 0,
          name: "账号管理",
          icon: "setting"
        },
        {
          id: 1,
          name: "专属客服",
          icon: "setting"
        },
        {
          id: 2,
          name: "常见问题",
          icon: "setting"
        },
        {
          id: 3,
          name: "关于我们",
          icon: "setting"
        },
        {
          id: 4,
          name: "联系我们",
          icon: "setting"
        }
      ]
    };
  },
  methods: {
    gotolink(id) {
      if (id == 0) {
        if (this.active == 0) {
          Dialog.confirm({
            title: "温馨提示",
            message: "您还未登录或登录状态失效，请登录后再来操作"
          })
            .then(() => {
              this.$router.push({ path: "/Login" });
            })
            .catch(() => {
              // on cancel
            });
        } else {
          this.$router.push({ path: "/Setup" });
        }
      } else if (id == 1) {
        this.$router.push({ path: "/Service" });
      } else if (id == 2) {
        this.$router.push({ path: "/FAQ" });
      } else if (id == 3) {
        this.$router.push({ path: "/AboutUs" });
      } else if (id == 4) {
        this.$router.push({ path: "/ContactUs" });
      }
    },

    Turnto(id, name) {
      if (id == 0) {
        if (this.active == 0) {
          Dialog.confirm({
            title: "温馨提示",
            message: "您还未登录或登录状态失效，请登录后再来操作"
          })
            .then(() => {
              this.$router.push({ path: "/Login" });
            })
            .catch(() => {
              // on cancel
            });
        } else {
          this.$router.push({ path: "/Order" });
        }
      } else if (id == 1) {
        this.$toast({
          message: "此功能等待后期开放"
        });
      } else if (id == 2) {
        this.$toast({
          message: "请先购买产品或联系客服！"
        });
      } else if (id == 3) {
        if (this.active == 0) {
          Dialog.confirm({
            title: "温馨提示",
            message: "您还未登录或登录状态失效，请登录后再来操作"
          })
            .then(() => {
              this.$router.push({ path: "/Login" });
            })
            .catch(() => {
              // on cancel
            });
        } else {
          this.$router.push({ path: "/QRcode" });
        }
      }
    }
  }
};
</script>

<style scoped>
.show-line {
  margin-top: -11px;
  background: #ffffff;
}
.Area-1 {
  width: 100%;
  height: 220px;
  background: url("../assets/images/a18.jpg") no-repeat 50%;
  background-size: cover;
  z-index: -1;
  display: flex;
  flex-flow: column wrap;
  text-align: center;
}

.Area-1-img {
  width: 66px;
  height: 66px;
  margin-left: 158px;
  margin-top: 30px;
  margin-bottom: 1px;
}
.addbottom {
  margin-bottom: 10px;
}
.Area-1-button {
  outline: none;
  background: none;
  border: 1px solid #fff;
  font-size: 14pxm;
  width: 80px;
  height: 30px;
  margin: 0 auto;
  border-radius: 5px;
  color: #fff;
}

.Area-2 {
  background: #ffffff;
  border-radius: 10px;
  min-width: 90%;
  max-width: 94%;
  z-index: 11;
  box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.1);
  height: 100px;
  margin: -27.5px auto 0;
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
}
.Area-2-div {
  display: block;
  width: 75px;
  height: 75px;
  margin-left: 10px;
  margin-top: 15px;
}
.Area-2-div-img {
  margin: 0px 0 10px 8px;
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
}
.Area-2-div-p {
  display: flex;

  width: 75px;
  text-align: left;
  font-size: 14px;
}

.Area-3 {
  margin-top: 18px;
  padding-left: 3%;
  background: #fff;
}
.Area-3-div {
  height: 55px;
  display: flex;
  flex-flow: row nowrap;
  align-content: space-between;
  padding-top: 20px;
  border-bottom: 1px solid #f6f6f6;
}
.Area-3-div-left {
  height: 35px;
  width: 108px;
  display: flex;
  font-size: 16px;
  flex-flow: row nowrap;
}
.Ares-3-icon {
  color: #41d08c;
  font-size: 22px;
}
.Ares-3-span {
  color: #333;
  font-size: 16px;
  margin-left: 14px;
}
.Area-3-div-right {
  width: 20%;
  height: 35px;
  padding-left: 63%;
  padding-right: 2%;
  flex-flow: row nowrap;
}
.Area-3-div-right-icon {
  color: silver;
  font-size: 18px;
}

.iconfont {
  font-family: iconfont !important;
  font-size: 16px;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  padding: 0;
  margin: 0;
}
body {
  background-color: #f6f6f6;
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  margin: 0;
  display: block;
}
div {
  display: block;
  box-sizing: border-box;
}
.banner {
  width: 100%;
  height: 100%;
}

.addstatus {
  display: none;
}
.vip-name {
  font-size: 16px;
  height: 21px;
  margin-bottom: 3px;
  letter-spacing: 1px;
  color: #ffffff;
}
.vip-one-card {
  width: 100%;
  height: 34px;
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  align-items: center;
  color: #ffffff;
}

.showspan {
  min-width: 60px;
  border: 1px solid #fff;
  font-size: 13px;
  border-radius: 20px;
  text-align: center;
  padding: 1px 5px;
  margin-left: 10px;
  height: 18px;
  line-height: 1.6;
}
</style>

